// JavaScript Document

var url = window.location.href;

/** ***********分享至******************* */
/* title是标题，rLink链接，summary内容，site分享来源，pic分享图片路径 */
/* 新浪微博 */
function shareTSina(title, rLink, site, pic) {
	if (!rLink || rLink == '')
		rLink = url;
	window
			.open('http://service.weibo.com/share/share.php?title='
					+ encodeURIComponent(title) + '&url='
					+ encodeURIComponent(rLink) + '&appkey='
					+ encodeURIComponent(site) + '&pic='
					+ encodeURIComponent(pic), '_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}
/* 腾讯微博 */
function shareToWb(title, rLink, site, pic) {
	if (!rLink || rLink == '')
		rLink = url;
	window
			.open('http://v.t.qq.com/share/share.php?url='
					+ encodeURIComponent(rLink) + '&title=' + encodeURI(title)
					+ '&appkey=' + encodeURI(site) + '&pic=' + encodeURI(pic),
					'_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}
/* 人人 */
function shareRR(title, rLink, summary) {
	if (!rLink || rLink == '')
		rLink = url;
	window
			.open('http://share.renren.com/share/buttonshare.do?title='
					+ encodeURIComponent(title) + '&link='
					+ encodeURIComponent(rLink), '_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}
/* 开心网 */
function shareKX(title, rLink, summary) {
	if (!rLink || rLink == '')
		rLink = url;
	window
			.open('http://www.kaixin001.com/repaste/bshare.php?rtitle='
					+ encodeURIComponent(title) + '&rurl='
					+ encodeURIComponent(rLink) + '&rcontent='
					+ encodeURIComponent(summary), '_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}
/* QQ空间 */
function shareQzone(title, rLink, summary, site, pic) {
	if (!rLink || rLink == '')
		rLink = url;
	window
			.open(
					'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title='
							+ encodeURIComponent(title) + '&url='
							+ encodeURIComponent(rLink) + '&summary='
							+ encodeURIComponent(summary) + '&site='
							+ encodeURIComponent(site) + '&pics='
							+ encodeURIComponent(pic), '_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}
/* 百度 */
function shareBaiDu(title, rLink) {
	if (!rLink || rLink == '')
		rLink = url;
	window
			.open('http://apps.hi.baidu.com/share?title='
					+ encodeURIComponent(title) + '&url='
					+ encodeURIComponent(rLink), '_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}
/* 豆瓣 */
function shareDouBan(title, rLink) {
	window
			.open('http://www.douban.com/recommend?title='
					+ encodeURIComponent(title) + '&url='
					+ encodeURIComponent(rLink), '_blank',
					'scrollbars=no,width=600,height=450,left=75,top=20,status=no,resizable=yes');
}